<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 
    location对象的属性
      location.href
        获取或设置整个url
      location.host
        返回主机域名(www.???.com)
      location.port
        返回端口号，若不写则为空
      location.pathname
        返回路径
      location.search
        返回参数
      location.hash
        返回片段，#后面的内容，常见于链接，锚点
  -->
</body>

</html>